home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
CD-ROM Tools
/
JukeBox 2.1
/
preview.jb
< prev
next >
Wrap
Text File
|
1996-09-26
|
862b
|
48 lines
/* play first <n> seconds of any track */
/* (c) copyright 1992,93 by F.J. Reichert */
parse arg seconds;
if seconds = '' | seconds = '?' | seconds <= 0 then do;
say 'usage: preview <seconds-to-play>';
exit(0);
end;
options results;
options failat 11;
toc stem names.;
if rc = 0 then do;
j = names.0 - 1;
say j 'tracks found'
say 'playing first' seconds 'seconds of each track';
say 'press [ESC] to abort';
do trk=1 to j;
current break;
if result ~= 0 then do;
say 'user abort';
leave;
end;
pause;
if rc ~= 0 then do;
say 'can''t access disc';
exit(5);
end;
set track trk;
toc trk;
res = 'track #'||overlay(trk,' ',1,2) result;
say res;
current time;
start = result;
play;
addtime start '00:'||seconds;
stop = result;
wait time stop;
end;
exit(0);
end;
else do;
say 'no disc inserted';
exit(5);
end;